-- GENERATED SPELL FOR [Decaying Ghoul] --


function spell0_28565(pUnit, Event) --@Flesh Rot,n/a--
pUnit:FullCastSpellOnTarget(28913,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28565', 10000, 1)
end

function Sorts_28565(pUnit, Event)
local choix_sorts_28565 = math.random(0, 0)
if choix_sorts_28565 == 0 then
pUnit:RegisterEvent('spell0_28565', 1, 1)
end
end

function mob28565_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28565', math.random(1500, 3000), 1)
end

function mob28565_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28565_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28565_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28565, 1, 'mob28565_Action')
RegisterUnitEvent(28565, 2, 'mob28565_Leave')
RegisterUnitEvent(28565, 3, 'mob28565_Kill')
RegisterUnitEvent(28565, 4, 'mob28565_Die')
